reftest-compare: Treat colour channels as undefined if alpha is zero
authorSimon McVittie <smcv@debian.org>
Thu, 2 Sep 2021 21:34:14 +0000 (22:34 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 3 Sep 2021 14:08:47 +0000 (15:08 +0100)
commit2fb3c2716b2755e84dbf4bbb36dcda88fd831017
treef2ec381dbe77d23b4b687a061f1f5dc8541204ee
parentf7b2cb39a81c21339382bce35c6d5802d2df5380
reftest-compare: Treat colour channels as undefined if alpha is zero

If the alpha channel is zero, it doesn't matter what the values of the
red, green and blue channels are: the pixel is still fully transparent.
On most architectures, fully transparent pixels end up all-zeroes
(fully transparent black), matching what's in the reference PNG file;
but on mips*el the blend-difference and blend-normal tests get all-ones
(fully transparent white) and a test failure.

Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227
Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3914
Applied-upstream: 4.5.0

Gbp-Pq: Name reftest-compare-Treat-colour-channels-as-undefined-if-alp.patch
testsuite/reftests/reftest-compare.c